package vmcs.boundary;

import java.awt.Panel;

/**
 * Title:        VMCS
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:      ISS
 * @author Pang Pingli
 * @version 1.0
 */

 import java.awt.event.*;
 import java.awt.*;

public class MessageDialog extends Dialog implements ActionListener {
  /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
public final static String  LOCK_DOOR = "Please Lock the Door before You Leave !!!";
  public final static String  NUMBER_FORMAT_ERROR = "You must enter digits only!!";

  public MessageDialog(Dialog fr, String msg) {
      super (fr, "Message", true);

      this.setLayout(new BorderLayout());

      Label   lb = new Label (msg);

      Button  ok = new Button ("OK");

      Panel        np  = new Panel();
      np.add(ok);
      Panel        nplb = new Panel();
      nplb.add(lb);

      this.add("Center", nplb);
      this.add("South", np);

      ok.addActionListener(this);

      pack();
      setLocation(200, 100);

      this.setVisible(true);

    }

    public void actionPerformed(ActionEvent e){
      this.dispose();
    }

}